package com.qishenyuan.competition.vo;

import com.qishenyuan.competition.model.JobRecommendation;
import com.qishenyuan.competition.utils.DateUtil;
import lombok.Data;

/**
 * @author Jacky
 * @since 2025-03-25
 */
@Data
public class JobRecommendationResp {
    private Integer id;

    private String internalPushCode;

    private String introductoryLink;

    private String icon;

    private String companyType;

    private String recruitmentType;

    private String contactInformation;

    private String location;

    private String deliveryTime;

    private String welfare;

    private String natureOfEnterprise;

    private String title;

    private String company;

    private String financing;

    private String numberOfPeople;

    private String recruitmentProfile;

    private String companyProfile;

    private String requirement;
    public static JobRecommendationResp buildVo(JobRecommendation jobRecommendation){
        JobRecommendationResp resp = new JobRecommendationResp();
        resp.setId(jobRecommendation.getId());
        resp.setInternalPushCode(jobRecommendation.getInternalPushCode());
        resp.setIntroductoryLink(jobRecommendation.getIntroductoryLink());
        resp.setIcon(jobRecommendation.getIcon());
        resp.setCompanyType(jobRecommendation.getCompanyType());
        resp.setRecruitmentType(jobRecommendation.getRecruitmentType());
        resp.setContactInformation(jobRecommendation.getContactInformation());
        resp.setLocation(jobRecommendation.getLocation());
        resp.setDeliveryTime(DateUtil.format(jobRecommendation.getDeliveryTime(), DateUtil.FORMAT_YYYY_MM_DD));
        resp.setWelfare(jobRecommendation.getWelfare());
        resp.setNatureOfEnterprise(jobRecommendation.getNatureOfEnterprise());
        resp.setTitle(jobRecommendation.getTitle());
        resp.setCompany(jobRecommendation.getCompany());
        resp.setFinancing(jobRecommendation.getFinancing());
        resp.setNumberOfPeople(jobRecommendation.getNumberOfPeople());
        resp.setRecruitmentProfile(jobRecommendation.getRecruitmentProfile());
        resp.setCompanyProfile(jobRecommendation.getCompanyProfile());
        resp.setRequirement(jobRecommendation.getRequirement());
        return resp;
    }
}
